home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / Ioc_GetFlags.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-07-30  |  1.4 KB  |  52 lines

  1. /* 
  2.  * Ioc_GetFlags.c --
  3.  *
  4.  *    Source code for the Ioc_GetFlags library procedure.
  5.  *
  6.  * Copyright 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  */
  15.  
  16. #ifndef lint
  17. static char rcsid[] = "$Header: Ioc_GetFlags.c,v 1.2 88/07/29 17:08:42 ouster Exp $ SPRITE (Berkeley)";
  18. #endif not lint
  19.  
  20. #include <sprite.h>
  21. #include <fs.h>
  22.  
  23.  
  24. /*
  25.  *----------------------------------------------------------------------
  26.  *
  27.  * Ioc_GetFlags --
  28.  *    Return the flags associated with the stream.  This is composed
  29.  *    of a standard set of flags in the bits masked by IOC_GENERIC_FLAGS,
  30.  *    plus other bits interpreted soely by the (pseudo) device driver.
  31.  *
  32.  * Results:
  33.  *    A copy of the flags.
  34.  *
  35.  * Side effects:
  36.  *    None.
  37.  *
  38.  *----------------------------------------------------------------------
  39.  */
  40.  
  41. ReturnStatus
  42. Ioc_GetFlags(streamID, flagsPtr)
  43.     int streamID;
  44.     int *flagsPtr;
  45. {
  46.     register ReturnStatus status;
  47.  
  48.     status = Fs_IOControl(streamID, IOC_GET_FLAGS, 0,
  49.             (Address)NULL, sizeof(int), (Address) flagsPtr);
  50.     return(status);
  51. }
  52.